Repository navigation
[API 37] Regenerate .NET for Android API documentation - #643
Conversation
118e7a2 to
bad8458
Compare
|
@dalexsoto review |
dalexsoto
left a comment
There was a problem hiding this comment.
The API 37 regeneration drops authored documentation for at least 21 unchanged, signature-matched members across seven files, replacing real summaries/returns/remarks with To be added.. Confirmed examples include parcelable members in NetworkRegistrationInfo, PhysicalChannelConfig, and SubscriptionInfo; TelephonyManager request/radio-family members; six NetworkRegistrationInfoServiceType values; three PhoneNumberSource values; and AccessibleObject.IsAnnotationPresent. Please restore the main-branch prose and add a full signature-keyed preservation check so unchanged members cannot lose authored documentation.
fce3462 to
dc31eb0
Compare
|
@dalexsoto Addressed in The preservation pass now matches members by exact C# signature, falling back to member name/kind/ordered parameter types when generated return or enum projections change. It restores both placeholder replacements and documentation elements removed entirely. Final audit: 130,052 matched members, 0 substantive-to-placeholder regressions, and 0 missing substantive elements. I also resolved the rebase's 69 duplicate DocIds while retaining the pre-rebase API 37 member metadata; all 2,235 changed XML files parse, with 0 duplicate DocIds and 0 conflict markers. Could you please re-review? |
dalexsoto
left a comment
There was a problem hiding this comment.
Three completeness blockers remain in the API 37 regeneration:
- A full Android 37 source/signature audit finds 644 new API owners across 159 files still missing 1,179 source-documented elements (14 type descriptions, 623 member descriptions, 159 returns, and 383 parameters), including
HealthPermissions.ReadActivityIntensity,String.SplitWithDelimiters,Notification.Metric.FixedTime, andPrinterInfo.Builder.SetSetupIntent. - Preservation still drops 49 substantive base elements: 48 type-level summaries/remarks across 46 matched types plus the unchanged
ActivityManager.GetRecentTaskssummary. - Removing
IInputTypeleaves four exact-head broken xrefs, and OpenPublishing reports 27 deleted public destinations without redirects.
Please repair the API 37 source import, extend preservation to type-level docs and the missing member summary, update stale references, and add redirects/historical handling for every removed destination.
e2c92f3 to
4133f38
Compare
|
Rebased onto current
@dalexsoto review requested again. |
|
@dalexsoto review |
dalexsoto
left a comment
There was a problem hiding this comment.
The API 37 output still has four independent blockers:
-
The regeneration erases existing current documentation. A signature-keyed preservation audit finds at least 283 direct substantive channels across 68 current XML files replaced by
To be added.or removed. For example,RegexOptions.xml:243-246erases the currentUnicodeCharacterClassfield summary, whileAppInfo.xml:173-176replaces the existingDescribeContentssummary, return and remarks. Preserve all signature-matched base documentation before importing API 37 content and rerun the preservation audit. -
--api-since 37omits platform-versioned API 37 owners that lack a literalApiSince=37.SelectOwnersgates every owner throughHasApiSince, which only recognizes the register attribute. There are 445 current direct owners markedSupportedOSPlatform("android37.0")without that attribute whose summaries remain placeholders;AppSearchResultCode.Unavailableis a direct JNI-mapped example. Include exact platform-version availability (and applicable type inheritance) in selection, then rerun the API 37 completeness import. -
The retained historical framework indexes reference member DocIds removed from the documentation set.
net-android-35.0.xml:84250-84254still lists theCallTypeCallControl.AnswerandRequestVideoStateidentities, butCallControl.xml:57-60retains only the distinctSystem.Int32signature. The same mismatch remains for the oldJniValueManager.ActivatePeerID. Preserve appropriate historical member records or add compatible member redirects so the versioned API inventory resolves. -
InputTypedirects users to a removed current API.InputType.xml:20says to useAndroid.Text.IInputType, but the current inventory containsInputTypesand noIInputType; the new redirect also targetsInputTypes. Correct the obsolete guidance in the generated signature/source or retain a valid currentIInputTypeAPI.
4133f38 to
e7c41c5
Compare
|
Rebased onto current
@dalexsoto review requested again. |
dalexsoto
left a comment
There was a problem hiding this comment.
Current API records still lose preserved documentation after signature projection. AppFunctionManager.SetAppFunctionEnabled:662-705 retains the same JNI identity after AppFunctionState became AppFunctionEnabledState, but all parameters, summary, and remarks are placeholders. ActivityManager.GetRecentTasks also replaces its exact-DocId summary with an empty element, and current CallControl.Answer/RequestVideoState forms retain placeholder remarks while prose exists only on historical alternates. Match active replacement records by stable JNI identity, treat empty elements as regressions, and restore base documentation to the current signatures.
Regenerate the Android API reference from the API 37 Mono.Android bindings and matching Android SDK sources. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Restore substantive documentation from main where API 37 generation introduced placeholder text after rebasing over the API 36.1 update. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
OpenPublishing requires unique ECMA member DocIds. Remove identical member copies retained while resolving the API 36.1 and API 37 generated-doc conflicts. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 57877110-585b-4e24-a34e-ec6cddc48db2
API 37 continues updating the existing .NET for Android Learn view. Reuse the published net-android-36.0 moniker for the generated framework inventory instead of referencing the undefined net-android-37.0 moniker. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 57877110-585b-4e24-a34e-ec6cddc48db2
Restore substantive documentation from main by exact or structural member signature, including elements that were replaced with placeholders or removed. Keep the API 37 member metadata while removing duplicate DocIds introduced by the rebase. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 57877110-585b-4e24-a34e-ec6cddc48db2
Update restored phone-number formatting documentation to use country/region while retaining the ISO 3166-1 standards terminology unchanged. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 57877110-585b-4e24-a34e-ec6cddc48db2
Preserve authored documentation from the latest base, import exact official Android and Java source documentation for API 37, and retain navigation for removed public destinations. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 57877110-585b-4e24-a34e-ec6cddc48db2
Recognize platform availability when selecting API-level documentation, restore current authored documentation and historical member identities, and correct the removed InputType replacement guidance. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 57877110-585b-4e24-a34e-ec6cddc48db2
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 57877110-585b-4e24-a34e-ec6cddc48db2
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 57877110-585b-4e24-a34e-ec6cddc48db2
Restore substantive documentation by exact member identity and stable JNI registration, including empty documentation channels, then complete remaining cached API 37 source imports. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 57877110-585b-4e24-a34e-ec6cddc48db2
15bc49b to
27dda43
Compare
|
Addressed the preservation review and rebased onto current
Validation: importer self-test passed; final offline API 37 dry-run reports 0 applicable changes and 0 errors; 2,232 changed XML files parse; 0 ordinal duplicate DocIds; 0 conflict markers; 0 localization files; @dalexsoto review requested again. |
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 57877110-585b-4e24-a34e-ec6cddc48db2
|
@dalexsoto review |
dalexsoto
left a comment
There was a problem hiding this comment.
Re-reviewed the complete 2,237-file revision 7ac03ee5d2f825f6e86a10c2e5dcc0a807eb4e22, including the generated corpus and publication paths. The latest SetAppFunctionEnabled, GetRecentTasks, and active CallControl preservation examples are fixed. Three blockers remain:
-
Preserve substantive documentation when regenerated text is nonempty but unusable. Forty-four exact-identity summaries across 19 files now contain slash separators or
{instead of their existing descriptions, for exampleCharSequenceTransformation.xml:140-144. Twenty additional publish-relevant remarks channels lose nonredundant contract prose;NfcAdapter.xml:3412-3414is one example where Android Beam availability/lifecycle/callback guidance becomes attribution alone. Restore these base channels and extend preservation validation beyond empty elements andTo be added.to syntax-only and attribution-only replacements. The complete affected inventory is below. -
Make the five retained historical method destinations publishable or redirect them.
PdfPagePathObject.SetFillColor/SetStrokeColor,PdfPageTextObject.SetFillColor/SetStrokeColor, andJniRuntime.JniValueManager.TryConstructPeerhave restored XML records but are absent from all three framework inventories (seenet-android-36.0.xml:27917-27922). A signature'sFrameworkAlternatealone does not retain the destination: ECMA2Yaml's member filter requires framework-index membership, and the exact-head publishing report confirms all five destinations are deleted without redirection. Add appropriate historical inventory membership or effective redirects for the emitted member destinations. -
Attach app-function parameter descriptions to the actual managed names.
IAppFunction.OnExecuteAppFunction:69-77declaresp0,p1, andp2, whose matching documentation remainsTo be added.. The imported prose is instead under nonexistent parameter namesrequest,cancellationSignal, andcallback. Publication looks up descriptions by the managed parameter name, so the real parameters remain undocumented, including the requirement that the callback complete exactly once. Move the existing descriptions to the verifiedp0/p1/p2correspondence and remove the unmatched duplicate keys; the JNI argument order matches the immutable AOSP declaration.
These additional failures already exist at 15bc49bf089049beed2fa1b642b91d897171e6b0: they are earlier review-completeness misses, not newly introduced regressions in the latest update. None requires broadening the accepted conservative source-import policy.
Complete preservation-loss inventory
All paths below are under docs/xml/.
| Files | Summary channels lost |
|---|---|
Android.Service.Autofill/{BatchUpdates,CharSequenceTransformation,CustomDescription,Dataset,DateTransformation,DateValueSanitizer,FillResponse,ImageTransformation,LuhnChecksumValidator,RegexValidator,SaveInfo,TextValueSanitizer,UserData,VisibilitySetterAction}.xml |
DescribeContents() and WriteToParcel(Android.OS.Parcel, Android.OS.ParcelableWriteFlags) in each file: 28 |
Android.Views.Autofill/AutofillValue.xml |
The same two parcelable methods: 2 |
Android.Text/Layout.xml |
IsFallbackLineSpacingEnabled: 1 |
Java.Util.Concurrent/LinkedBlockingDeque.xml |
Peek() and Poll(): 2 |
Java.Util/Objects.xml |
Compare, DeepEquals, Equals, HashCode, IsNull, NonNull, RequireNonNullElse, RequireNonNullElseGet, ToString(Object), and ToString(Object,String): 10 |
Org.Xml.Sax.Ext/Attributes2Impl.xml |
IsDeclared(System.Int32): 1 |
| Total | 44 summaries |
The 20 nonredundant, publish-relevant remarks losses are:
| Files | Remarks channels lost |
|---|---|
Android.Media/RemoteControlClient+MetadataEditor.xml |
PutLong(Android.Media.MetadataKey,System.Int64) and PutString(Android.Media.MetadataKey,System.String): changes after apply() are not displayed |
Android.Nfc/NfcAdapter.xml |
SetNdefPushMessage(NdefMessage,Activity,Activity[]) and SetNdefPushMessageCallback(ICreateNdefMessageCallback,Activity,Activity[]): availability, lifecycle, callback-precedence and permission guidance |
Android.Service.Autofill/{CharSequenceTransformation,CustomDescription,Dataset,FillResponse,ImageTransformation,LuhnChecksumValidator,RegexValidator,SaveInfo}.xml |
Both parcelable methods listed above in each file: 16 contract remarks |
The review used complete immutable base/head comparisons, authoritative source checks, independent XML reductions, and static publication-path tracing; downloaded PR code was not executed.
Restore the complete reviewed documentation inventory, publish retained historical member destinations, and attach app-function parameter documentation to the generated managed names. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 57877110-585b-4e24-a34e-ec6cddc48db2
|
Addressed review
Validation: 64/64 requested channels restored; importer self-test passed; offline API 37 dry-run reports 0 applicable changes and 0 errors; all 23 changed XML files parse; all 5 historical destinations occur exactly once in the API 36 inventory; app-function parameters and documentation keys match exactly; no localization changes, conflict markers, or @dalexsoto review requested again. |
dalexsoto
left a comment
There was a problem hiding this comment.
Re-reviewed the complete current PR at d7b005cb3d89f4a352ad005274cd00b51fc09644. All 44 summaries and 20 remarks are restored exactly from the immutable base. The five historical methods now have unique, correctly parented framework membership and no longer appear in the publishing deletion diagnostics. IAppFunction descriptions bind correctly to p0/p1/p2, retaining the exactly-once callback requirement.
Earlier preservation, API-37 availability, history and cross-reference fixes remain intact, and the accepted conservative source policy is unchanged. No high-confidence blocking issues remain.
Summary
API level
This update specifically targets Android API 37 (
AndroidApiLevel=37,AndroidPlatformId=37.0). The published documentation continues to use the single .NET for Android product moniker rather than adding an API-level product dropdown.Documentation preservation
The generated output was compared against the current
maindocumentation and repaired to avoid replacing substantive authored content with placeholders, empty elements, syntax-only text, or attribution-only remarks.Notable preservation work includes:
Source import
The conservative importer is scoped to declarations introduced in API 37. It recognizes
ApiSince=37, exactSupportedOSPlatform("android37.0")metadata, and inherited type availability where members have no direct version metadata.The final cached source pass applied all eligible exact matches. A subsequent offline dry run reported:
Validation
git diff --checkpasses